(0) Obligation:
Runtime Complexity TRS:
The TRS R consists of the following rules:
from(X) → cons(X, from(s(X)))
length(nil) → 0
length(cons(X, Y)) → s(length1(Y))
length1(X) → length(X)
Rewrite Strategy: INNERMOST
(1) RenamingProof (EQUIVALENT transformation)
Renamed function symbols to avoid clashes with predefined symbol.
(2) Obligation:
Runtime Complexity Relative TRS:
The TRS R consists of the following rules:
from(X) → cons(X, from(s(X)))
length(nil) → 0'
length(cons(X, Y)) → s(length1(Y))
length1(X) → length(X)
S is empty.
Rewrite Strategy: INNERMOST
(3) SlicingProof (LOWER BOUND(ID) transformation)
Sliced the following arguments:
from/0
cons/0
(4) Obligation:
Runtime Complexity Relative TRS:
The TRS R consists of the following rules:
from → cons(from)
length(nil) → 0'
length(cons(Y)) → s(length1(Y))
length1(X) → length(X)
S is empty.
Rewrite Strategy: INNERMOST
(5) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)
Infered types.
(6) Obligation:
Innermost TRS:
Rules:
from → cons(from)
length(nil) → 0'
length(cons(Y)) → s(length1(Y))
length1(X) → length(X)
Types:
from :: cons:nil
cons :: cons:nil → cons:nil
length :: cons:nil → 0':s
nil :: cons:nil
0' :: 0':s
s :: 0':s → 0':s
length1 :: cons:nil → 0':s
hole_cons:nil1_0 :: cons:nil
hole_0':s2_0 :: 0':s
gen_cons:nil3_0 :: Nat → cons:nil
gen_0':s4_0 :: Nat → 0':s
(7) OrderProof (LOWER BOUND(ID) transformation)
Heuristically decided to analyse the following defined symbols:
from,
length,
length1They will be analysed ascendingly in the following order:
length = length1
(8) Obligation:
Innermost TRS:
Rules:
from →
cons(
from)
length(
nil) →
0'length(
cons(
Y)) →
s(
length1(
Y))
length1(
X) →
length(
X)
Types:
from :: cons:nil
cons :: cons:nil → cons:nil
length :: cons:nil → 0':s
nil :: cons:nil
0' :: 0':s
s :: 0':s → 0':s
length1 :: cons:nil → 0':s
hole_cons:nil1_0 :: cons:nil
hole_0':s2_0 :: 0':s
gen_cons:nil3_0 :: Nat → cons:nil
gen_0':s4_0 :: Nat → 0':s
Generator Equations:
gen_cons:nil3_0(0) ⇔ nil
gen_cons:nil3_0(+(x, 1)) ⇔ cons(gen_cons:nil3_0(x))
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))
The following defined symbols remain to be analysed:
from, length, length1
They will be analysed ascendingly in the following order:
length = length1
(9) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)
Could not prove a rewrite lemma for the defined symbol from.
(10) Obligation:
Innermost TRS:
Rules:
from →
cons(
from)
length(
nil) →
0'length(
cons(
Y)) →
s(
length1(
Y))
length1(
X) →
length(
X)
Types:
from :: cons:nil
cons :: cons:nil → cons:nil
length :: cons:nil → 0':s
nil :: cons:nil
0' :: 0':s
s :: 0':s → 0':s
length1 :: cons:nil → 0':s
hole_cons:nil1_0 :: cons:nil
hole_0':s2_0 :: 0':s
gen_cons:nil3_0 :: Nat → cons:nil
gen_0':s4_0 :: Nat → 0':s
Generator Equations:
gen_cons:nil3_0(0) ⇔ nil
gen_cons:nil3_0(+(x, 1)) ⇔ cons(gen_cons:nil3_0(x))
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))
The following defined symbols remain to be analysed:
length1, length
They will be analysed ascendingly in the following order:
length = length1
(11) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
length1(
gen_cons:nil3_0(
n9_0)) →
gen_0':s4_0(
n9_0), rt ∈ Ω(1 + n9
0)
Induction Base:
length1(gen_cons:nil3_0(0)) →RΩ(1)
length(gen_cons:nil3_0(0)) →RΩ(1)
0'
Induction Step:
length1(gen_cons:nil3_0(+(n9_0, 1))) →RΩ(1)
length(gen_cons:nil3_0(+(n9_0, 1))) →RΩ(1)
s(length1(gen_cons:nil3_0(n9_0))) →IH
s(gen_0':s4_0(c10_0))
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(12) Complex Obligation (BEST)
(13) Obligation:
Innermost TRS:
Rules:
from →
cons(
from)
length(
nil) →
0'length(
cons(
Y)) →
s(
length1(
Y))
length1(
X) →
length(
X)
Types:
from :: cons:nil
cons :: cons:nil → cons:nil
length :: cons:nil → 0':s
nil :: cons:nil
0' :: 0':s
s :: 0':s → 0':s
length1 :: cons:nil → 0':s
hole_cons:nil1_0 :: cons:nil
hole_0':s2_0 :: 0':s
gen_cons:nil3_0 :: Nat → cons:nil
gen_0':s4_0 :: Nat → 0':s
Lemmas:
length1(gen_cons:nil3_0(n9_0)) → gen_0':s4_0(n9_0), rt ∈ Ω(1 + n90)
Generator Equations:
gen_cons:nil3_0(0) ⇔ nil
gen_cons:nil3_0(+(x, 1)) ⇔ cons(gen_cons:nil3_0(x))
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))
The following defined symbols remain to be analysed:
length
They will be analysed ascendingly in the following order:
length = length1
(14) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)
Could not prove a rewrite lemma for the defined symbol length.
(15) Obligation:
Innermost TRS:
Rules:
from →
cons(
from)
length(
nil) →
0'length(
cons(
Y)) →
s(
length1(
Y))
length1(
X) →
length(
X)
Types:
from :: cons:nil
cons :: cons:nil → cons:nil
length :: cons:nil → 0':s
nil :: cons:nil
0' :: 0':s
s :: 0':s → 0':s
length1 :: cons:nil → 0':s
hole_cons:nil1_0 :: cons:nil
hole_0':s2_0 :: 0':s
gen_cons:nil3_0 :: Nat → cons:nil
gen_0':s4_0 :: Nat → 0':s
Lemmas:
length1(gen_cons:nil3_0(n9_0)) → gen_0':s4_0(n9_0), rt ∈ Ω(1 + n90)
Generator Equations:
gen_cons:nil3_0(0) ⇔ nil
gen_cons:nil3_0(+(x, 1)) ⇔ cons(gen_cons:nil3_0(x))
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))
No more defined symbols left to analyse.
(16) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
length1(gen_cons:nil3_0(n9_0)) → gen_0':s4_0(n9_0), rt ∈ Ω(1 + n90)
(17) BOUNDS(n^1, INF)
(18) Obligation:
Innermost TRS:
Rules:
from →
cons(
from)
length(
nil) →
0'length(
cons(
Y)) →
s(
length1(
Y))
length1(
X) →
length(
X)
Types:
from :: cons:nil
cons :: cons:nil → cons:nil
length :: cons:nil → 0':s
nil :: cons:nil
0' :: 0':s
s :: 0':s → 0':s
length1 :: cons:nil → 0':s
hole_cons:nil1_0 :: cons:nil
hole_0':s2_0 :: 0':s
gen_cons:nil3_0 :: Nat → cons:nil
gen_0':s4_0 :: Nat → 0':s
Lemmas:
length1(gen_cons:nil3_0(n9_0)) → gen_0':s4_0(n9_0), rt ∈ Ω(1 + n90)
Generator Equations:
gen_cons:nil3_0(0) ⇔ nil
gen_cons:nil3_0(+(x, 1)) ⇔ cons(gen_cons:nil3_0(x))
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))
No more defined symbols left to analyse.
(19) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
length1(gen_cons:nil3_0(n9_0)) → gen_0':s4_0(n9_0), rt ∈ Ω(1 + n90)
(20) BOUNDS(n^1, INF)